package com.keepsport.keepsportapi.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.io.Serializable;

/**
 * 朋友圈(TCommunityCircle)实体类
 *
 * @author makejava
 * @since 2022-07-01 18:48:15
 */
@Data
@NoArgsConstructor
@TableName("t_community_circle")
public class CommunityCircle implements Serializable {
    private static final long serialVersionUID = -49668808903814884L;
    /**
     * 序号
     */
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * 用户id
     */
    private Integer uid;
    /**
     * 内容
     */
    private String content;
    /**
     * 图片
     */
    private String picture;
    /**
     * 点赞
     */
    private Integer likenum;
    /**
     * 发布时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date ctime;
    public CommunityCircle(Integer uid, String content) {
        this.uid = uid;
        this.content = content;
        this.picture = null;
        this.likenum = 0;
        this.ctime = new Date();
    }
}

